// DigitalCurrentData.cpp : implementation file
//

#include "stdafx.h"
#include "kwservercore.h"
#include "DigitalCurrentData.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// DigitalCurrentData

//IMPLEMENT_DYNAMIC(DigitalCurrentData, CThreadSafeRecordset1)

DigitalCurrentData::DigitalCurrentData(CAdoConnection *pConnection)
	: CAdoRecordSet(pConnection)
{
	m_pConnection = pConnection;
	//{{AFX_FIELD_INIT(DigitalCurrentData)
	m_RecordNum = _T("");
	m_CoalMineId = 0;
	m_CoalMineName = _T("");
	m_MonUnitId = _T("");
	m_MonUnitName = _T("");
	m_MonUnitType = _T("");
	m_MonUnitState = 0;
	m_MonUnitStateDes = _T("");
	m_StateChangeTime = CTime::GetCurrentTime();
	m_MonUnitData = 0;
	m_MonUnitDataDes = _T("");
	m_relation = _T("");
	m_Modify = 0;
	//m_nFields = 13;
	//}}AFX_FIELD_INIT
	//m_nDefaultType = snapshot;
}

CString DigitalCurrentData::GetDefaultConnect()
{
	return _T("ODBC;DSN=KWSystem;UID=kwuser;PWD=1234");
}

CString DigitalCurrentData::GetDefaultSQL()
{
	return _T("[dbo].[DigitalCurrentData]");
}

void DigitalCurrentData::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(DigitalCurrentData)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[RecordNum]"), m_RecordNum);
	RFX_Long(pFX, _T("[CoalMineId]"), m_CoalMineId);
	RFX_Text(pFX, _T("[CoalMineName]"), m_CoalMineName);
	RFX_Text(pFX, _T("[MonUnitId]"), m_MonUnitId);
	RFX_Text(pFX, _T("[MonUnitName]"), m_MonUnitName);
	RFX_Text(pFX, _T("[MonUnitType]"), m_MonUnitType);
	RFX_Byte(pFX, _T("[MonUnitState]"), m_MonUnitState);
	RFX_Text(pFX, _T("[MonUnitStateDes]"), m_MonUnitStateDes);
	RFX_Date(pFX, _T("[StateChangeTime]"), m_StateChangeTime);
	RFX_Byte(pFX, _T("[MonUnitData]"), m_MonUnitData);
	RFX_Text(pFX, _T("[MonUnitDataDes]"), m_MonUnitDataDes);
	RFX_Text(pFX, _T("[relation]"), m_relation);
	RFX_Byte(pFX, _T("[Modify]"), m_Modify);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// DigitalCurrentData diagnostics

#ifdef _DEBUG
void DigitalCurrentData::AssertValid() const
{
	//CRecordset::AssertValid();
}

void DigitalCurrentData::Dump(CDumpContext& dc) const
{
	//CRecordset::Dump(dc);
}
#endif //_DEBUG